From 8a42c19f417a886b6f7f3c0f63b10d6996f88553 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 14 Aug 2011 19:47:44 +0000 Subject: [PATCH] Made Xml::buildTable() wrap header stuff in --- includes/Xml.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/Xml.php b/includes/Xml.php index c48863f803..f937003289 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -794,6 +794,8 @@ class Xml { $s = Xml::openElement( 'table', $attribs ); if ( is_array( $headers ) ) { + $s = Xml::openElement( 'thead', $attribs ); + foreach( $headers as $id => $header ) { $attribs = array(); @@ -803,6 +805,7 @@ class Xml { $s .= Xml::element( 'th', $attribs, $header ); } + $s = Xml::closeElement( 'thead' ); } foreach( $rows as $id => $row ) { @@ -822,8 +825,8 @@ class Xml { /** * Build a row for a table - * @param $attribs An array of attributes to apply to the tr tag - * @param $cells An array of strings to put in + * @param $attribs array An array of attributes to apply to the tr tag + * @param $cells array An array of strings to put in * @return string */ public static function buildTableRow( $attribs, $cells ) { -- 2.20.1